<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        //第一种创建方式
        var arr1 = [1, 2, 3];
        //第二种创建方式
        // var arr2=new Array(2);创建长度为2的数组
        var arr2 = new Array(3, 4);
        console.log(arr2);
    </script>

</head>

<body>

</body>

</html>